feat(atomic): migrate atomic-timeframe to Lit#6793
Merged
fbeaudoincoveo merged 21 commits intomainfrom Dec 17, 2025
Merged
Conversation
Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Migrate atomic timeframe implementation
feat(atomic): migrate atomic-timeframe to Lit
Dec 12, 2025
fbeaudoincoveo
requested changes
Dec 15, 2025
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.ts
Show resolved
Hide resolved
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.ts
Show resolved
Hide resolved
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.ts
Outdated
Show resolved
Hide resolved
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.ts
Show resolved
Hide resolved
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.spec.ts
Show resolved
Hide resolved
- Delete original Stencil atomic-timeframe.tsx file - Add LitElementWithError implementation with error state property - Add constructor with Bueno schema validation (as private static readonly) - Pass false to ValidatePropsController to only log validation errors - Flatten nested describe blocks in tests per testing conventions - Add skipped validation tests with KIT-5197 TODOs Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR successfully migrates atomic-timeframe from Stencil to Lit as part of the framework modernization effort. The component is a light DOM data container that defines timeframe configurations for timeframe facet components. The migration follows established patterns for Lit components while preserving all functionality and adding comprehensive tests and documentation.
Key Changes
- Component rewrite: Complete conversion from Stencil
.tsxto Lit.tsusingLightDomMixin(LitElement)with property decorators and Bueno validation - Test suite addition: New comprehensive unit test suite with 17 active tests covering property validation, attribute reflection, and error handling
- Storybook enhancement: Updated stories with MSW mocking for realistic facet integration examples, plus comprehensive MDX documentation
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.tsx |
Deleted original Stencil component implementation |
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.ts |
New Lit implementation with property validation using ValidatePropsController |
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.spec.ts |
New comprehensive unit test suite with property, validation, and attribute reflection tests |
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.new.stories.tsx |
Enhanced stories with MSW mocking and multiple story variants (past/next periods, custom labels) |
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.mdx |
New documentation with usage examples and related component links |
packages/atomic/src/components/common/index.ts |
Added export for Lit component |
packages/atomic/src/components/common/lazy-index.ts |
Added lazy loading entry for component |
packages/atomic/src/utils/custom-element-tags.ts |
Registered component tag in custom element set |
packages/atomic/src/components.d.ts |
Removed Stencil-generated type definitions (now handled by Lit) |
packages/atomic-react/src/components/search/components.ts |
Added React wrapper for search interfaces |
packages/atomic-react/src/components/commerce/components.ts |
Added React wrapper for commerce interfaces |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/atomic/src/components/common/atomic-timeframe/atomic-timeframe.spec.ts
Outdated
Show resolved
Hide resolved
… value Apply bot suggestion to create element with period='past' directly rather than modifying post-render, following the established pattern of creating elements with desired props. Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com>
alexprudhomme
approved these changes
Dec 17, 2025
fbeaudoincoveo
approved these changes
Dec 17, 2025
watallah
pushed a commit
that referenced
this pull request
Dec 18, 2025
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: fbeaudoincoveo <23503066+fbeaudoincoveo@users.noreply.github.com> Co-authored-by: Frederic Beaudoin <fbeaudoin@coveo.com> Co-authored-by: developer-experience-bot[bot] <91079284+developer-experience-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✅ Checklist
.mdxfileindex.tsandlazy-index.tsfiles.https://coveord.atlassian.net/browse/KIT-5321
Description
Migrates
atomic-timeframefrom Stencil to Lit as part of the framework modernization effort. This is a light DOM data container component with no rendering logic or controller integration.Changes Made
Component Migration
LightDomMixin(LitElement)with@propertydecoratorsTimeframeinterface andLitElementWithErrorperiod,unit,amount,label(all reflected to attributes)atomic-timeframe.tsxTesting
it.eachandit.skip.eachpatterns from atomic-result-list.spec.tsDocumentation
Exports
index.tsandlazy-index.tsfor Lit component loadingUsage
Notes
This component is a data container with no rendering logic or controller integration. E2E testing is handled through parent facet components (
atomic-timeframe-facet, etc.). No component-specific Cypress tests exist for this component.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.